package com.edu.order.feign.fallback;

import com.edu.order.feign.ProductFeignClient;
import com.edu.product.bean.Product;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import java.math.BigDecimal;

@Slf4j
@Component
public class ProductFeignClientFallback implements ProductFeignClient {

    @Override
    public Product getProductById(Long id) {
        log.info("兜底回调...");
        return new Product(id, new BigDecimal(0), "商品不存在");
    }


}
